import pylab as pl

dimensions = [[0.874502,0.861129, 0.840321,0.869762,0.857471,0.842023,0.860325,0.848740,0.869290,0.856617],
 [0.775452,0.787219,0.809321,0.766454,0.773167,0.79217,0.783329,0.762354,0.793425,0.774980],
 [0.544361,0.561623,0.557095,0.564391,0.541911,0.526017,0.532311,0.551047,0.5435291,0.560984]]
dx=[1,2,3,4,5,6,7,8,9,10]

s=0
for i in range(10):
  s += dimensions[0][i]
s=s/10
ims=[]

for i in range(10):
  ims.append(s)

print "imporoved smote:"
print s

s=0
for i in range(10):
  s += dimensions[1][i]
s=s/10
trs=[]
for i in range(10):
  trs.append(s)
print "traditional smote:"
print s

s=0
for i in range(10):
  s += dimensions[2][i]
s=s/10
wis=[]
for i in range(10):
  wis.append(s)
print "without smote:"
print s

#10-0,20-10,30-20,40-30,50-40 huatu
pl.xlim([0, 11])
pl.ylim([0.4, 1])
pl.plot(dx,dimensions[0],'-xr',label='Imporved(average=%0.2f)'% ims[0]);
pl.plot(dx,dimensions[1],'-xg',label='Traditional(average=%0.2f)'% trs[0]);
pl.plot(dx,dimensions[2],'-xb',label='Without(average=%0.2f)'% wis[0]);
pl.plot(dx,ims,'--r');
pl.plot(dx,trs,'--g');
pl.plot(dx,wis,'--b');
pl.xlabel('Cross-Validation')
pl.ylabel('F1-Measure')
pl.title('F1-Measure Comparison')
pl.legend(loc="lower right")
pl.show()